import {Modal} from 'antd';
import {WeaLocaleProvider} from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;

//删除等信息确认
export const doConfirm = (content, func, val) => {//确认信息， 方法， 方法参数
  Modal.confirm({
    title: `${getLabel(131329,'信息确认')}`,
    content: content,
    okText: `${getLabel(382958,'确定')}`,
    cancelText:`${getLabel(31129,'取消')}`,
    onOk: () => func(val),
  })
}

//提示
export const setModal = (content) => {
  Modal.warning({
    title: `${getLabel(15172,'系统提示')}`,
    content: content,
  });
}

//selectedRows遍历得到ids
export const getIds = (datas) => {
  let ids = [];
  datas && datas.length !== 0 && datas.map(item => {
    ids.push(Number(item.id))
  })
  return ids.join(',')
}